<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf入门</title>
</head>
<body>
<table border="1" align="center">
    <h2 align="center">用户页面</h2>
    <hr>
    <a th:href="@{/ccc/toadd}"><button>添加用户信息</button></a>
        <tr>
            <th th:width="80px">编号</th>
            <th th:width="80px">姓名</th>
            <th th:width="80px">性别</th>
            <th th:width="80px">年龄</th>
            <th th:width="80px">地址</th>
            <th th:width="100px">生日</th>
            <th th:width="120px">爱好</th>
            <th th:width="120px">操作</th>
        </tr>
        <tr th:each="u:${list}">
            <td th:text="${u.id}" th:align="center"></td>
            <td th:text="${u.name}" th:align="center"></td>
            <td th:text="${u.sex.equals('1')}?'男':'女'" th:align="center"></td>
            <td th:text="${u.age}" th:align="center"></td>
            <td th:text="${u.address}" th:align="center"></td>
            <td th:text="${#dates.format(u.birthday,'yyyy-MM-dd')}" th:align="center"></td>
            <td th:text="${u.hobby}" th:align="center"></td>
            <td>
                &nbsp;&nbsp;<button><a th:href="@{/ccc/delete(id=${u.id})}">删除</a></button>&nbsp;
                <button><a th:href="@{/ccc/findupdate(id=${u.id})}">修改</a></button>&nbsp;&nbsp;
            </td>
        </tr>
</table>
</body>
</html>